package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CoTestMechatypeMapper;
import com.ruoyi.system.domain.CoTestMechatype;
import com.ruoyi.system.service.ICoTestMechatypeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 机构类型管理Service业务层处理
 * 
 * @author 冬木逢春
 * @date 2022-06-19
 */
@Service
public class CoTestMechatypeServiceImpl implements ICoTestMechatypeService 
{
    @Autowired
    private CoTestMechatypeMapper coTestMechatypeMapper;

    /**
     * 查询机构类型管理
     * 
     * @param mechaId 机构类型管理主键
     * @return 机构类型管理
     */
    @Override
    public CoTestMechatype selectCoTestMechatypeByMechaId(Long mechaId)
    {
        return coTestMechatypeMapper.selectCoTestMechatypeByMechaId(mechaId);
    }

    /**
     * 查询机构类型管理列表
     * 
     * @param coTestMechatype 机构类型管理
     * @return 机构类型管理
     */
    @Override
    public List<CoTestMechatype> selectCoTestMechatypeList(CoTestMechatype coTestMechatype)
    {
        return coTestMechatypeMapper.selectCoTestMechatypeList(coTestMechatype);
    }

    /**
     * 新增机构类型管理
     * 
     * @param coTestMechatype 机构类型管理
     * @return 结果
     */
    @Override
    public int insertCoTestMechatype(CoTestMechatype coTestMechatype)
    {
        return coTestMechatypeMapper.insertCoTestMechatype(coTestMechatype);
    }

    /**
     * 修改机构类型管理
     * 
     * @param coTestMechatype 机构类型管理
     * @return 结果
     */
    @Override
    public int updateCoTestMechatype(CoTestMechatype coTestMechatype)
    {
        return coTestMechatypeMapper.updateCoTestMechatype(coTestMechatype);
    }

    /**
     * 批量删除机构类型管理
     * 
     * @param mechaIds 需要删除的机构类型管理主键
     * @return 结果
     */
    @Override
    public int deleteCoTestMechatypeByMechaIds(String mechaIds)
    {
        return coTestMechatypeMapper.deleteCoTestMechatypeByMechaIds(Convert.toStrArray(mechaIds));
    }

    /**
     * 删除机构类型管理信息
     * 
     * @param mechaId 机构类型管理主键
     * @return 结果
     */
    @Override
    public int deleteCoTestMechatypeByMechaId(Long mechaId)
    {
        return coTestMechatypeMapper.deleteCoTestMechatypeByMechaId(mechaId);
    }
}
